package com.sunxueqi.project.home.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sunxueqi.framework.web.controller.BaseController;
import com.sunxueqi.framework.web.vo.ResponseData;
import com.sunxueqi.project.home.service.IDashboardService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags="首页仪表盘")
@RestController
@RequestMapping("/dashboard")
public class DashboardController extends BaseController {
	
	@Autowired
	private IDashboardService dashboardService;
	
	/**
	 * 获取后台主页面板信息
	 * @return
	 */
	@ApiOperation("获取后台主页面板信息")
	@GetMapping("/panelGroup")
	public ResponseData list() {
		startPage();
		Map<String, Long> panelGroupData = dashboardService.getPanelGroupData();
		return ResponseData.success(panelGroupData);
	}
}
